package com.ddpt.platform.common.enums;

public enum CouponUseRangeEnum {


    ACTIVITY(1,"活动"),
    MALL(2,"商城"),
    MALL_GOODS(3,"商城商品"),
    MALL_CATEGORY(4,"商城分类")
    ;

    private Integer code;

    private String msg;

    CouponUseRangeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getMsg(Integer code){
        CouponUseRangeEnum[] values = CouponUseRangeEnum.values();
        for (CouponUseRangeEnum value : values) {
            if(value.getCode() == code){
                return value.getMsg();
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }


}
